﻿<%@ Page Title="" Language="C#" MasterPageFile="~/share/Site1.Master" AutoEventWireup="true"
    CodeBehind="ChangePassword.aspx.cs" Inherits="RGPWEB.ChangePassword" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">

    <script src="inc/Script/pub.js" type="text/javascript"></script>

    <script type="text/javascript">
        function CheckPassword() {
            var ret = true;
            var str = "";
            $id("strinfo").innerHTML = "";

            ErrorStr = new Array(); //错误消息

            if (!IsEmpty($id("txt_password").value)) {
                ErrorStr.push("原密码不能为空,请输入原密码!");
            }
            else if (!IsEmpty($id("txt_newpassword").value)) {
                ErrorStr.push("新密码不能为空,请输入新密码!");
            }
            else if (!IsEmpty($id("txt_renewpassword").value)) {
                ErrorStr.push("验证密码不能为空,请输入验证密码!");
            }
            else if (!CompValue($id("txt_newpassword").value, $id("txt_renewpassword").value)) {
                ErrorStr.push("新密码与验证密码不相同,请检查后重试!");
            }
            if (ErrorStr.length != 0) {
                str = "<ul>";
                for (var i = 0; i < ErrorStr.length; i++) {
                    str = str + "<li>" + ErrorStr[i] + "</li>";
                }
                str = str + "</ul>";
                $id("strinfo").innerHTML = str;
                $id("strinfo").style.display = "block";
                ret = false;
            }
            else {
                $id("strinfo").innerHTML = "";
                $id("strinfo").style.display = "none";
            }

            return ret;
        }
    </script>

    <style type="text/css">
        .style10
        {
            width: 128px;
        }
        .style11
        {
            width: 114px;
            height: 16px;
        }
        .style12
        {
            height: 21px;
        }
        .style13
        {
            width: 128px;
            height: 21px;
        }
        .style14
        {
            height: 21px;
            width: 37px;
        }
    </style>

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentMain" runat="server">
    <div id="strinfo" class="mbox pbox" style="display: none;">
    </div>
    <fieldset id="Fieldset1" class="Fieldsetbox mbox pbox">
        <legend class="fsTitle">修改登录密码</legend>
        <table width="526" border="0" cellpadding="0" cellspacing="5">
            <tr>
                <td class="style10">
                    <div align="right" class="f14">
                        原&nbsp;密&nbsp;码</div>
                </td>
                <td width="161" colspan="2">
                    <input type="password" name="txt_password" class="inputbox" style="width: 150px;"
                        id="txt_password" />
                </td>
                <td width="258" class="tcgray f14">
                    &nbsp;
                </td>
            </tr>
            <tr>
                <td class="style10">
                    <div align="right" class="f14">
                        新&nbsp;密&nbsp;码</div>
                </td>
                <td colspan="2">
                    <input type="password" name="txt_newpassword" class="inputbox" style="width: 150px;"
                        id="txt_newpassword" />
                </td>
                <td class="tcgray f14">
                    &nbsp;
                </td>
            </tr>
            <tr>
                <td class="style10">
                    <div align="right" class="f14">
                        再次输入新密码</div>
                </td>
                <td colspan="2">
                    <input type="password" name="txt_renewpassword" class="inputbox" style="width: 150px;"
                        id="txt_repassword" />
                </td>
                <td class="tcgray f14">
                    &nbsp;
                </td>
            </tr>
            <tr>
                <td class="style13">
                    <div align="right">
                    </div>
                </td>
                <td class="style14">
                    &nbsp;</td>
                <td class="style12">
                    <asp:Button ID="btn_submit" runat="server" Text=" 确认修改 " Height="35px" OnClick="btn_submit_Click"
                        Width="108px" />
                </td>
                <td class="style12">
                    &nbsp;
                </td>
            </tr>
        </table>
    </fieldset>
</asp:Content>
